package com.ruoyi.ies.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ies.mapper.VehicleMaintenanceMapper;
import com.ruoyi.ies.domain.VehicleMaintenance;
import com.ruoyi.ies.service.IVehicleMaintenanceService;

/**
 * 车辆维修Service业务层处理
 *
 * @author July
 * @date 2023-06-12
 */
@Service
public class VehicleMaintenanceServiceImpl implements IVehicleMaintenanceService
{
    @Autowired
    private VehicleMaintenanceMapper vehicleMaintenanceMapper;

    /**
     * 查询车辆维修
     *
     * @param vehicleId 车辆维修主键
     * @return 车辆维修
     */
    @Override
    public VehicleMaintenance selectVehicleMaintenanceByVehicleId(Long vehicleId)
    {
        return vehicleMaintenanceMapper.selectVehicleMaintenanceByVehicleId(vehicleId);
    }

    /**
     * 查询车辆维修列表
     *
     * @param vehicleMaintenance 车辆维修
     * @return 车辆维修
     */
    @Override
    public List<VehicleMaintenance> selectVehicleMaintenanceList(VehicleMaintenance vehicleMaintenance)
    {
        return vehicleMaintenanceMapper.selectVehicleMaintenanceList(vehicleMaintenance);
    }

    /**
     * 新增车辆维修
     *
     * @param vehicleMaintenance 车辆维修
     * @return 结果
     */
    @Override
    public int insertVehicleMaintenance(VehicleMaintenance vehicleMaintenance)
    {
        return vehicleMaintenanceMapper.insertVehicleMaintenance(vehicleMaintenance);
    }

    /**
     * 修改车辆维修
     *
     * @param vehicleMaintenance 车辆维修
     * @return 结果
     */
    @Override
    public int updateVehicleMaintenance(VehicleMaintenance vehicleMaintenance)
    {
        return vehicleMaintenanceMapper.updateVehicleMaintenance(vehicleMaintenance);
    }

    /**
     * 批量删除车辆维修
     *
     * @param vehicleIds 需要删除的车辆维修主键
     * @return 结果
     */
    @Override
    public int deleteVehicleMaintenanceByVehicleIds(Long[] vehicleIds)
    {
        return vehicleMaintenanceMapper.deleteVehicleMaintenanceByVehicleIds(vehicleIds);
    }

    /**
     * 删除车辆维修信息
     *
     * @param vehicleId 车辆维修主键
     * @return 结果
     */
    @Override
    public int deleteVehicleMaintenanceByVehicleId(Long vehicleId)
    {
        return vehicleMaintenanceMapper.deleteVehicleMaintenanceByVehicleId(vehicleId);
    }
}
